.class public abstract Lcom/a0soft/gphone/app2sd/a/l;
.super Lcom/a0soft/gphone/aSys/a;
.source "RetrieveAppsTask.java"


# static fields
.field private static final g:Ljava/lang/String;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Landroid/content/Context;

.field private c:Landroid/app/ProgressDialog;

.field private d:Ljava/lang/StringBuffer;

.field private e:Z

.field private f:Z


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 25
    const-class v0, Lcom/a0soft/gphone/app2sd/a/l;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/a0soft/gphone/app2sd/a/l;->g:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 2
    .parameter

    .prologue
    .line 30
    invoke-direct {p0}, Lcom/a0soft/gphone/aSys/a;-><init>()V

    .line 32
    iput-object p1, p0, Lcom/a0soft/gphone/app2sd/a/l;->a:Landroid/content/Context;

    .line 33
    new-instance v0, Ljava/lang/StringBuffer;

    const/16 v1, 0x100

    invoke-direct {v0, v1}, Ljava/lang/StringBuffer;-><init>(I)V

    iput-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->d:Ljava/lang/StringBuffer;

    .line 34
    return-void
.end method

.method private varargs h()Ljava/lang/Integer;
    .locals 9

    .prologue
    const/4 v8, 0x1

    const/4 v7, 0x0

    .line 62
    invoke-static {}, Lcom/a0soft/gphone/app2sd/main/CoreApp;->h()Lcom/a0soft/gphone/app2sd/main/CoreApp;

    move-result-object v0

    invoke-virtual {v0}, Lcom/a0soft/gphone/app2sd/main/CoreApp;->i()Lcom/a0soft/gphone/app2sd/a/a;

    move-result-object v1

    .line 63
    iget-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->a:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    .line 66
    invoke-virtual {v2, v7}, Landroid/content/pm/PackageManager;->getInstalledPackages(I)Ljava/util/List;

    move-result-object v0

    .line 67
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v3

    move v4, v7

    :cond_0
    :goto_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/content/pm/PackageInfo;

    .line 68
    invoke-virtual {v1, v2, v0}, Lcom/a0soft/gphone/app2sd/a/a;->a(Landroid/content/pm/PackageManager;Landroid/content/pm/PackageInfo;)Lcom/a0soft/gphone/app2sd/a/g;

    move-result-object v0

    .line 69
    if-eqz v0, :cond_0

    .line 71
    add-int/lit8 v4, v4, 0x1

    .line 75
    iget-boolean v5, p0, Lcom/a0soft/gphone/app2sd/a/l;->e:Z

    if-eqz v5, :cond_0

    rem-int/lit8 v5, v4, 0xa

    if-ne v5, v8, :cond_0

    .line 76
    const/4 v5, 0x2

    new-array v5, v5, [Ljava/lang/Object;

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    aput-object v6, v5, v7

    aput-object v0, v5, v8

    invoke-virtual {p0, v5}, Lcom/a0soft/gphone/app2sd/a/l;->c([Ljava/lang/Object;)V

    goto :goto_0

    .line 78
    :cond_1
    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    return-object v0
.end method

.method private i()V
    .locals 5

    .prologue
    const/4 v4, 0x1

    .line 94
    iget-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->b:Landroid/content/Context;

    iget-object v1, p0, Lcom/a0soft/gphone/app2sd/a/l;->b:Landroid/content/Context;

    const v2, 0x7f050008

    invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    iget-object v2, p0, Lcom/a0soft/gphone/app2sd/a/l;->b:Landroid/content/Context;

    const v3, 0x7f05000a

    invoke-virtual {v2, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-static {v0, v1, v2, v4, v4}, Landroid/app/ProgressDialog;->show(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZZ)Landroid/app/ProgressDialog;

    move-result-object v0

    iput-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    .line 100
    return-void
.end method

.method private j()V
    .locals 1

    .prologue
    .line 141
    iget-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    if-eqz v0, :cond_1

    .line 142
    iget-boolean v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->f:Z

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 152
    :try_start_0
    iget-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->dismiss()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 155
    :cond_0
    :goto_0
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    .line 158
    :cond_1
    invoke-virtual {p0}, Lcom/a0soft/gphone/app2sd/a/l;->e()V

    .line 159
    return-void

    :catch_0
    move-exception v0

    goto :goto_0
.end method


# virtual methods
.method protected final bridge synthetic a()Ljava/lang/Object;
    .locals 1

    .prologue
    .line 16
    invoke-direct {p0}, Lcom/a0soft/gphone/app2sd/a/l;->h()Ljava/lang/Integer;

    move-result-object v0

    return-object v0
.end method

.method public final a(Landroid/content/Context;)V
    .locals 1
    .parameter

    .prologue
    .line 42
    iput-object p1, p0, Lcom/a0soft/gphone/app2sd/a/l;->b:Landroid/content/Context;

    .line 44
    iget-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    if-eqz v0, :cond_0

    .line 47
    :try_start_0
    iget-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->show()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 56
    :cond_0
    :goto_0
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->e:Z

    .line 57
    return-void

    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method protected final varargs a([Ljava/lang/Object;)V
    .locals 4
    .parameter

    .prologue
    const/4 v3, 0x0

    .line 105
    iget-boolean v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->e:Z

    if-nez v0, :cond_1

    .line 131
    :cond_0
    :goto_0
    return-void

    .line 107
    :cond_1
    iget-boolean v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->f:Z

    if-nez v0, :cond_2

    iget-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    if-nez v0, :cond_2

    .line 108
    invoke-direct {p0}, Lcom/a0soft/gphone/app2sd/a/l;->i()V

    .line 110
    :cond_2
    aget-object v0, p1, v3

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v1

    .line 111
    const/4 v0, 0x1

    aget-object v0, p1, v0

    check-cast v0, Lcom/a0soft/gphone/app2sd/a/g;

    .line 116
    iget-boolean v2, p0, Lcom/a0soft/gphone/app2sd/a/l;->f:Z

    if-nez v2, :cond_0

    iget-object v2, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    if-eqz v2, :cond_0

    .line 118
    iget-object v2, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    invoke-virtual {v2}, Landroid/app/ProgressDialog;->isShowing()Z

    move-result v2

    if-nez v2, :cond_3

    .line 120
    :try_start_0
    iget-object v2, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    invoke-virtual {v2}, Landroid/app/ProgressDialog;->show()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 124
    :cond_3
    :goto_1
    iget-object v2, p0, Lcom/a0soft/gphone/app2sd/a/l;->d:Ljava/lang/StringBuffer;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->setLength(I)V

    .line 125
    iget-object v2, p0, Lcom/a0soft/gphone/app2sd/a/l;->d:Ljava/lang/StringBuffer;

    invoke-virtual {v0}, Lcom/a0soft/gphone/app2sd/a/g;->a()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v0}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v0

    const-string v2, " ("

    invoke-virtual {v0, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v0

    invoke-virtual {v0, v1}, Ljava/lang/StringBuffer;->append(I)Ljava/lang/StringBuffer;

    move-result-object v0

    const/16 v1, 0x29

    invoke-virtual {v0, v1}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;

    .line 129
    iget-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    iget-object v1, p0, Lcom/a0soft/gphone/app2sd/a/l;->d:Ljava/lang/StringBuffer;

    invoke-virtual {v0, v1}, Landroid/app/ProgressDialog;->setMessage(Ljava/lang/CharSequence;)V

    goto :goto_0

    :catch_0
    move-exception v2

    goto :goto_1
.end method

.method protected final b()V
    .locals 1

    .prologue
    .line 86
    iget-boolean v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->e:Z

    if-nez v0, :cond_0

    .line 89
    :goto_0
    return-void

    .line 88
    :cond_0
    invoke-direct {p0}, Lcom/a0soft/gphone/app2sd/a/l;->i()V

    goto :goto_0
.end method

.method protected final bridge synthetic c()V
    .locals 0

    .prologue
    .line 16
    invoke-direct {p0}, Lcom/a0soft/gphone/app2sd/a/l;->j()V

    return-void
.end method

.method public abstract e()V
.end method

.method public final f()V
    .locals 1

    .prologue
    .line 164
    iget-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    if-eqz v0, :cond_1

    .line 165
    iget-boolean v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->f:Z

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 173
    :try_start_0
    iget-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->dismiss()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 176
    :cond_0
    :goto_0
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->c:Landroid/app/ProgressDialog;

    .line 179
    :cond_1
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->f:Z

    .line 180
    return-void

    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method public final g()V
    .locals 1

    .prologue
    .line 185
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/a0soft/gphone/app2sd/a/l;->f:Z

    .line 186
    return-void
.end method
